<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<script src="/headfirst_js/debug/debug.js"></script>
<script>
	var debug;
	function Person(name){
		this.name= name;
	}
	Person.prototype.getName = function(){
		return this.name;
	};
	
	function User(name,password){
		this.name = name;
		this.password = password;
	}
	
	User.prototype = new Person();   //person의 모든 메소드를 상속 한다.
	User.prototype.getPassword = function(){
		return this.password;
	}
	
	function inheriteTest(){
		var user = new User("lee","rafuta");
		debug.displayMsg("user.name:"+user.getName()); //person에서 상속받은 getName()메소드 호출
		debug.displayMsg("user.pass:"+user.getPassword());
	}
	
	window.onload=function(e){
		debug =  new DebugConsole();
		inheriteTest();
	}
</script>
</head>
<body>

</body>
</html>